package org.helgoboss.build_helgoboss_commons_app

import org.helgoboss.build_helgoboss_commons_commandlet.BuildHelgobossCommonsCommandlet
import org.helgoboss.one_filer_ref_impl.OneFilerRefImpl
import org.helgoboss.commandlet_app.CommandletApp
import org.helgoboss.maven_ref_impl.MavenRefImpl
import org.helgoboss.custom_one_filer_template.CustomOneFilerTemplate
import org.helgoboss.basic_one_filer_template.BasicOneFilerTemplate
import org.helgoboss.one_filer_template_manager.OneFilerTemplateManager

object Main extends CommandletApp {
    def commandlet = new BuildHelgobossCommonsCommandlet (
        oneFiler = {
            val m = new OneFilerTemplateManager
            m.registerTemplate(BasicOneFilerTemplate)
            m.registerTemplate(CustomOneFilerTemplate)
            new OneFilerRefImpl(lookupTemplate = m.findTemplate _)
        }
    )
}